package sort;

public class BubbleSort {
    public static void main(String arg[]) {

        int arr[] = new int[]{1231, 12, 12, 31, 23, 123, 12, 31, 23};


        for (int i = 0; i < arr.length; i++)
            for (int j = i; j < arr.length; j++) {
                if (arr[i] < arr[j]) {
                    int temp = arr[i];
                    arr[i] = arr[j];
                    arr[j] = temp;
                }
            }

        for (int i : arr)
            System.out.println(i);

    }
}
